home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / compuserve-file-archive / 03 Demos and Info / DIAL.TXT < prev    next >
Encoding:
Text File  |  2019-04-13  |  4.0 KB  |  109 lines

  1.  
  2.  
  3.  Many modems, that are available for the Commodore 64 and 128, can be
  4. classified as "dumb" modems. Unlike the Hayes standard "smart" modems, the
  5. features of a dumb modem are almost exclusively software controlled.
  6.  
  7.  The major example of a software controlled function, is auto-dialing.
  8. Dialing is by no means automatic. It is a semi-complicated
  9. toggling of the modem on and offline. Despite this sounding rather
  10. undependable, it is in fact the method that electronic phones use, when
  11. they pulse dial.
  12.  
  13.  The following is intended as a guide for terminal programmers who wish
  14. to write their own pulse dialing routines. The first part outlines the
  15. dialing process. The second describes how the following process can
  16. can be applied to the popular modems.
  17.  
  18.  The dialing process consists of the following steps:
  19.  
  20.  1: Put the modem online. A delay is now necessary, to give the telephone
  21.     exchange sufficient time to supply a dial tone. 1.5 to 2 seconds is
  22.     usually enough, but this might be different for your particular
  23.     exchange.
  24.  
  25.  2: Form a PULSE COUNTER using next digit of the phone number. Digits 1-9
  26.     are converted to the representative value 1-9 in the counter. Zero
  27.     are represented by the representative value 1-9 in the counter. Zero
  28.     is special. As zero doesn't convey information, the digit zero
  29.     is converted into 10 pulses (counter = 10).
  30.  
  31.  3: The pulse loop commences. The toggling of the modem on/offline is
  32.     timed as follows:
  33.  
  34.       a) Put modem offline for 60 milliseconds. Modem back online.
  35.       b) Delay for 40 milliseconds.
  36.       c) Decrement pulse counter. If pulse counter is not zero go
  37.          back to step a).
  38.  
  39.  4: An inter-digit delay for 700 milliseconds. If all digits of
  40.     phone number have not been dialed, go back to step 2.
  41.  
  42.  5: Wait for carrier.
  43.  
  44.  The above delays can be considered the maximum needed for dependable
  45. dialing. I have found that 40/30/300 to be as dependable. Your range will
  46. vary with your exchange's equipment.
  47.  
  48.  An example delay routine in BASIC:
  49.  
  50. 10 t=value: rem value is milleseconds/10 eg 700 -> value = 70
  51. 20 t=t-1: if t<>0 then 10
  52.  
  53.  I've written an ML version, but, if your doing it in ML, then that's a
  54. nice exercise (grin).
  55.  
  56.  
  57. PART 2:
  58. -------
  59.  
  60.  It seems like every modem manufacturer takes great pride in making
  61. their modem operate differently from their competitor's. Fortunately,
  62. through the fog, there is light. The dialing mode of nearly all 64/128
  63. dumb modems can be classified into two categories:
  64.  
  65.  1) 1650 compatible. eg Pocket modem, 1064, 64 Modem
  66.  
  67.  2) 1660 compatible. eg Mitey Mo, HES-II
  68.  
  69.  
  70.  The computer communicates with the modem via the user port, which is
  71. hooked to the NMI generating CIA chip. The location that concerns
  72. the programmer, is dec 56577 ($DD01) which is Data Port B of this CIA.
  73.  
  74.  The Data Direction Register at location 56579 ($DD03) controls the
  75. direction (in or out of the computer) of the lines represented in 56577.
  76.  
  77. POKE56579,38   This is a universal POKE. In addition to the hook line, this
  78.                sets as outputs the lines Request to Send, and
  79.                Data Terminal Ready. These are used by modems for
  80.                various purposes, but the POKE is common. The other 5
  81.                lines are inputs.
  82.  
  83.  
  84.  Bit 5 of 56577, and its corresponding line, are used by the
  85. Commodore compatible dumb modems, for controlling the hook. By toggling
  86. this bit, the modem can be put on and offline, or, if you prefer,
  87. off and on hook.
  88.  
  89.  
  90.  The on/offline POKEs in BASIC are:
  91.  
  92.  Modem             Online                       Offline
  93.  
  94. 1650 compatible    POKE56577,PEEK(56577)OR32    POKE56577,PEEK(56577)AND223
  95. 1660 compatible    POKE56577,PEEK(56577)AND223  POKE56577,PEEK(56577)OR32
  96.  
  97.  As you can see, the logic for the 1650 and 1660 are exactly opposite. The
  98. reason the change was made (the 1660 being a later design), was probably
  99. because the 64 defaults to bit 5 on, and thus a 1650 defaults online,
  100. even when not in use.
  101.  
  102.  
  103.  This should give you information to get started. Please feel free to
  104. leave me any questions you have.
  105.  
  106. GOOD LUCK!
  107.  
  108. Sysop Gary Farmaner.  Compuserve
  109.